<{Tinclude "commom/admin_header"}>
<link href="<?php echo CSS_PATH;?>jquery-ui.css" rel="stylesheet" />
 <script src="<?php echo JS_PATH;?>datepicker-zh-TW.js"></script>
   <{Tinclude"tenantcommom/tenant_inner_header"}>
    <{Tinclude"tenantcommom/tenant_left_menu"}>
     <section id="main-content">
          <section class="wrapper">
            <h3><i class="fa fa-angle-right"></i> 租房单</h3>
              <div class="row mt">
                
                  <div class="col-lg-12">
                      <div class="row mt">
                         <div class="col-md-12">
                             <form class="form-panel" method="POST" action="<{echo Common::RewriteUrl($jp_arg["c"],"zupay");}>">  
                                <div class="panel panel-default">
                                    <input readonly="readonly"  type="hidden" name="id" value="<{$rent["id"]}>" />
                                    <div class="panel-body jphuibackground"> 
                                        <ul class="list-group">
                                            <li class="list-group-item">
                                                <span class="glyphicon glyphicon-user"></span>租户:<{$tenant["base_name"]}>
                                            </li>
                                             <li class="list-group-item">
                                                <span class="glyphicon glyphicon-user"></span>房东:<{$roominfo["admininfo"]["real_name"]}>
                                                 
                                            </li>
                                              <li class="list-group-item">
                                
                                                  <span class="fa fa-building-o"></span>租所:<{$roominfo["build_name"]}>&nbsp;&nbsp;
                                                  <{$roominfo["layer_id"]}>层&nbsp;&nbsp;
                                                  <{$roominfo["room_no"]}>号
                                            </li>
                                            <li class="list-group-item">
                                                <span class="glyphicon glyphicon-usd"></span>租金:
                                                <{$rent["l_rent"]}>元,已付<{$rent["r_rent"]}>元
                                            </li>
                                            <{if $rent["l_water_price"]>0}>
                                             <li class="list-group-item">
                                                <span class="glyphicon glyphicon-usd"></span>水费:
                                                <{$rent["l_water_price"]}>元,已付<{$rent["r_water_price"]}>元
                                            </li>
                                            <{/if}>
                                            <{if $rent["l_dian_price"]>0}>
                                            <li class="list-group-item">
                                                <span class="glyphicon glyphicon-usd"></span>电费:
                                                <{$rent["l_dian_price"]}>元,已付<{$rent["r_dian_price"]}>元
                                            </li>
                                            <{/if}>
                                             <{if $rent["l_rent"]-$rent["r_rent"]>0}>
                                            <li class="list-group-item">
                                                <span class="glyphicon glyphicon-usd"></span>需付租金:
                                                <input type="text" class="jpdateinput"  name="needpayrent" value="<{echo ($rent["l_rent"]-$rent["r_rent"]);}>" />元
                                            </li>
                                            <{/if}>
                                              <{if $rent["l_dian_price"]>0&&$rent["l_dian_price"]-$rent["r_dian_price"]>0}>
                                            <li class="list-group-item">
                                                <span class="glyphicon glyphicon-usd"></span>需付电费:
                                                <input type="text" class="jpdateinput"  name="needpaydian" value="<{echo ($rent["l_dian_price"]-$rent["r_dian_price"]);}>" />元
                                            </li>
                                            <{/if}>
                                             <{if $rent["l_water_price"]>0&&$rent["l_water_price"]-$rent["r_water_price"]>0}>
                                            <li class="list-group-item">
                                                <span class="glyphicon glyphicon-usd"></span>需付水费:
                                                <input type="text" class="jpdateinput"  name="needpaywater" value="<{echo ($rent["l_water_price"]-$rent["r_water_price"]);}>" />元
                                            </li>
                                            <{/if}>    
                                            
                                           <{if $rent["is_deposit"]==1&&$rent["roomreluser"]["deposit_pay_status"]==0}>
                                            <li class="list-group-item">
                                                <span class="glyphicon glyphicon-usd"></span>需付押金:
                                                <input type="text" readonly="readonly" class="jpdateinput"  name="needpaydeposit" value="<{$rent["roomreluser"]["deposit"]}>" />元
                                            </li>
                                            <{/if}> 
                                        </ul>
                                        
                                           <ul class="list-group paylist">
                                               <{if isset($roominfo["paylist"])}>
                                               <{foreach $roominfo["paylist"] as $k=>$v}>
                                               <li class="list-group-item paycheck <{if $k==0}>checkon<{/if}>">
                                                   <img src="<{$v["thumb"]}>" class="img-rounded" /><b class="jpb"><{$v["c_base_name"]}></b><span class="paytype"> <input type="radio" <{if $k==0}>checked="checked"<{/if}> name="paytype" id="<{$v["base_name"]}>" value="<{$v["payid"]}>" /></span>
                                              <div class="jpde"><{$v["desc"]}></div>
                                               </li>
                                               <{/foreach}>
                                               <{/if}>
                                           </ul>
                                        
                                        <div class="row jpbaibackground">
                                            <div class="col-md-6 text-center color_red f14 jpheji">
                                                <b>合计: <span id="heji"><{if $rent["is_deposit"]==1&&$rent["roomreluser"]["deposit_pay_status"]==0}><{echo ($rent["l_total"]-$rent["r_total"]+$rent["roomreluser"]["deposit"]);}><{else}><{echo ($rent["l_total"]-$rent["r_total"]);}><{/if}></span>元</b>
                                            </div>
                                             <div class="col-md-6">
                                                 <button class="btn jpbtnred" type="submit">去付款</button>
                                            </div>
                                        </div>
                                        
                                    </div>
                                </div>
                            </form>
                         </div>
                      </div>
                  </div>
              </div>
          </section>
     </section>
    <script>
        $(document).ready(function(){
               
                $("li.paycheck").click(function(){
                   $("li.paycheck").removeClass("checkon");
                   $(this).addClass("checkon");
                   //$("input[name='paytype']").prop("checked", false);
                   $(this).children().find("input[name='paytype']").prop("checked",true);
                   
                });
	});
        
        </script>
            <{Tinclude"commom/admin_footer"}>